API - CoTemplate\Cotpl_var
system\cotemplate.php at line 1510

Class Cotpl_var

Cotpl_var

public class Cotpl_var

CoTemplate variable with callback extensions support
Property-read:
string $name Tag name

Field Summary
protected array Sequential list of callback processors

$callbacks

protected array Sequence of keys for arrays

$keys

protected string Variable name

$name

Constructor Summary
void

__construct(string text)

Method Summary
mixed

__get(string name)

Property getter

string

__toString()

TPL string representation for debugging

private string

dump(mixed val)

Variable debug output handler for {var_name|dump}

private static string

dump_r(string key, mixed val, int level)

Recursively fetches debug representation of a TPL variable

mixed

evaluate(XTemplate tpl)

Evaluates a variable

Field Detail

system\cotemplate.php at line 1523

callbacks

protected array Sequential list of callback processors $callbacks = null

system\cotemplate.php at line 1519

keys

protected array Sequence of keys for arrays $keys = null

system\cotemplate.php at line 1515

name

protected string Variable name $name = ''

Constructor Detail

system\cotemplate.php at line 1528

__construct

public void __construct(string text)
Parameters:
text - Variable code from TPL file

Method Detail

system\cotemplate.php at line 1564

__get

public mixed __get(string name)
Property getter
Parameters:
name - Property name
Returns:
Property value

system\cotemplate.php at line 1580

__toString

public string __toString()
TPL string representation for debugging
Returns:

system\cotemplate.php at line 1611

dump

private string dump(mixed val)
Variable debug output handler for {var_name|dump}
Parameters:
val - Var value
Returns:

system\cotemplate.php at line 1629

dump_r

private static string dump_r(string key, mixed val, int level)
Recursively fetches debug representation of a TPL variable
Parameters:
key - Variable key
val - Variable value
level - Current nesting level
Returns:

system\cotemplate.php at line 1657

evaluate

public mixed evaluate(XTemplate tpl)
Evaluates a variable
Parameters:
tpl - Reference to CoTemplate storing local variables
Returns:
Variable value or NULL if variable was not found